<%@tag pageEncoding="UTF-8"%>
<%@include file="screw.tag" %>
<%@ attribute name="code" type="java.lang.String" required="false" rtexprvalue="true"%>
<%@ attribute name="url" type="java.lang.String" required="false" rtexprvalue="true"%>

<c:if test="${disabled == 'true'}" >
	<c:set var="disabled" value="readonly='readonly'" />
</c:if>

<script type="text/javascript" src="${ctx }/base/js/dictionary/dictionary.js"></script>
<script type="text/javascript">
	
	$(function(){
		var dic = dictionary.find("${code}");
		var input = "<label><input id='${id }' $check name='${name }' type='radio' />$value</label>";
		var temp = "";
		var is = "";
		for (var i in dic) {
			
			var d = dic[i];
// 			alert(d.code+"-->${value}"+(d.code == "${value}"));
			if (d.code == "${value}") {
				temp = input.replace("$check", "checked='checked'");
			}else {
				temp = input.replace("$check", "");
			}
			is += temp.replace("$value",d.text);
		}
		document.getElementById("radioDiv").outerHTML = is;
	});
	
</script>


<div id="radioDiv"></div>





